#!/usr/bin/env bash

EXECUTABLE=$1

LDD_STDOUT=$(ldd "$EXECUTABLE" 2>&1)

if [ "$LDD_STDOUT" == *"not a dynamic executable"* ]; then
  echo "$EXECUTABLE is statically linked."
  exit 0
else
  echo "$EXECUTABLE is dynamically linked."
  exit 1
fi
